package order;

import cn.yunhe.entity.Order;
import cn.yunhe.service.OrderService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author 苏文秀
 * @date 2018/9/20 15:19
 */
public class OrderDemo {
    ApplicationContext ac=new ClassPathXmlApplicationContext("spring/spring-mybatis.xml");
    OrderService orderService= (OrderService) ac.getBean("orderService");
    @Test
    public void test(){
        Order order=orderService.getOrderByOuid("12kdzsj39502545fdjs6t43056456434");
        System.out.println(order.getCars().getLicenseNum()+","+order.getEmp().getEmpName()+","+order.getUser().getSname());
    }
}
